<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>

<style>

</style>

<body>


<label>
    文本输入框:
    <input type="password" value="平安喜乐 万事顺逐">
</label>

<script>
    const element = document.querySelector('input');
    console.log(element.value);
    element.type = 'text'
</script>
</body>
</html>